package com.source3g.dubbo.registry.consul;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.registry.Registry;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;

/**
 * Created by jianglin on 2016/12/27
 */
public class ConsulRegistryFactory extends AbstractRegistryFactory {

    public void setServiceIdGenerator(ServiceIdGenerator serviceIdGenerator) {
        this.serviceIdGenerator = serviceIdGenerator;
    }

    private ServiceIdGenerator serviceIdGenerator;

    @Override
    protected Registry createRegistry(URL url) {
        return new ConsulRegistry(url, serviceIdGenerator);
    }
}
